home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Unix / xgopher.1.3 / Documents / Edits < prev    next >
Encoding:
Text File  |  1993-04-07  |  2.2 KB  |  62 lines

  1. Most commands provided to Xgopher via resources are edited in a manner
  2. similar to the C-language printf formats.  Each command may provide
  3. function codes which will be changed into the appropriate value before the
  4. command is executed.  For example, the function code "%f" is replaced
  5. by an internal file name generated by Xgopher.  So, the print command
  6.  
  7.    lpr %f
  8.  
  9. will add the file name to the end of the print command.  A command
  10. is edited by examining each character, preserving the original
  11. characters except for sequences of two characters beginning with
  12. a %.
  13.  
  14. The editing function codes are:
  15.  
  16.     %h    replaced by the host name from the gopher item
  17.     %p    replaced by the port number from the gopher item
  18.     %P    similar to %p, except when the port is 0 or 23, then %P
  19.         is replaced by a space
  20.     %n    replaced by the name (user string) from the gopher item
  21.     %s    replaced by the selector (path) from the gopher item
  22.     %f    replaced by the name of the temporary file that Xgopher
  23.         is using to process this item.  For convenience, on
  24.         some commands, a %f is implied at the end of the string
  25.         if no editing function codes appeared in the command.
  26.     %%    replaced by a single %.
  27.  
  28. All function codes are not valid for all commands.  The valid combinations
  29. are shown here:
  30.  
  31.     print        %h %n %f
  32.             (selector and port are not relevant;
  33.             the file name appended to the end of the command
  34.             automatically if no %'s appear in the command)
  35.  
  36.     telnet, tn3270    %h %p %n %s %P
  37.             (no file applicable; usually use %P instead of %p)
  38.  
  39.     image        %h %p %n %s %f %P
  40.             (the file name appended to the end of the command
  41.             automatically if no %'s appear in the command)
  42.  
  43.     sound        %h %p %n %s %P
  44.             (file name is not applicable)
  45.  
  46. Suggested values for the resources using these codes effectively are:
  47.  
  48.     printCommand    (This depends a lot on your local printer environment.)
  49.             I like this one for a PostScript printer with
  50.             Adobe's TranScript software:
  51.                 enscript -G -b"%n" -p - %f | lpr -Pgfx
  52.  
  53.     telnetCommand    xterm -n "telnet" -title "%h" -e telnet %h %P
  54.  
  55.     tn3270Command    xterm -n "tn3270" -title "%h" -e tn3270 %h %P
  56.  
  57.     imageCommand    xloadimage -quiet
  58.  
  59.     soundCommand    (This depends a lot on your local commands to play
  60.             sounds.)  For a Sun, I use:
  61.                 cat > /dev/audio
  62.